'use strict';
let index: number = 10;
var ResTable: object = { 1: 5, 2: 4, 3: 3 };
function computed(x: number) {
    return x;
}
ResTable.hasOwnProperty(index) ? ResTable[index] : ResTable[index] = computed(index);
console.log(ResTable);
